home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Code Resources / SliderCDEF 1.0 / SliderCDEF Source ƒ / SliderCalcThumbRgn.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-10  |  633 b   |  21 lines  |  [TEXT/KAHL]

  1. #include "SliderCDEF.h"
  2.  
  3. // SliderCalcThumbRgn
  4. //
  5. // Calculates the entire indicator's region.  Note: the calcCntlRgn message is only
  6. // sent by the control manager when running in 32-bit mode. Under 24-bit mode
  7. // the single message calcCRgns is sent for all region calculations.
  8. void SliderCalcThumbRgn( short varCode, ControlHandle theControl, long param )
  9. {
  10.     Rect    thumbRect;
  11.     
  12.     // Get the thumb's rect.
  13.     thumbRect = CalcThumbRect( theControl );
  14.     
  15.     // Make a tiny adjustment.
  16.     thumbRect.bottom += 1;
  17.     thumbRect.right += 1;
  18.     
  19.     // Give the control manager a handle to the thumb's region.
  20.     RectRgn( (RgnHandle) param, &thumbRect );
  21. }